﻿// <copyright file="ReadOnlyChanged.cs" company="Signal Processing Lab, Wuhan University">
// Copyright (c) 2009-2010 All Right Reserved
// </copyright>
// <author>Xinping Deng</author>
// <email>dentoby@gmail.com</email>
// <date>2010-4</date>
// <summary>This is part of Image.NET project.</summary>

namespace SPLWHU.Core
{
    using System;

    /// <summary>
    /// The ReadOnlyChanged Event.
    /// </summary>
    /// <param name="sender">The event sender</param>
    /// <param name="e">The event arguments</param>
    public delegate void ReadOnlyChanged(object sender, ReadOnlyChangedArgs e);

    /// <summary>
    /// The ReadOnlyChanged EventArgs.
    /// </summary>
    public class ReadOnlyChangedArgs : EventArgs
    {
        /// <summary>
        /// Indicating whether [read only] or not.
        /// </summary>
        private bool readOnly;
      
        /// <summary>
        /// Initializes a new instance of the <see cref="ReadOnlyChangedArgs"/> class.
        /// </summary>
        /// <param name="readOnly">if set to <c>true</c> [read only].</param>
        public ReadOnlyChangedArgs(bool readOnly)
        {
            this.readOnly = readOnly;
        }

        /// <summary>
        /// Gets or sets a value indicating whether [read only].
        /// </summary>
        /// <value><c>true</c> if [read only]; otherwise, <c>false</c>.</value>
        public bool ReadOnly
        {
            get { return this.readOnly; }
            set { this.readOnly = value; }
        }
    }
}
